package otherTest;

import java.util.ArrayList;
import java.util.List;

public class AA {

    public static void main(String[] args) {
        List<BB> bbList = new ArrayList<>();
        BB bb = new BB();
        bb.setBb1("sss");
        bbList.add(bb);
        System.out.println(bbList.toString());
        bb.setBb2("vvvvvvvvvvv");
        System.out.println(bbList.toString());
    }







   public static class BB {
       private String bb1;
       private String bb2;

       public String getBb1() {
           return bb1;
       }

       public void setBb1(String bb1) {
           this.bb1 = bb1;
       }

       public String getBb2() {
           return bb2;
       }

       public void setBb2(String bb2) {
           this.bb2 = bb2;
       }

       @Override
       public String toString() {
           return "BB{" +
                   "bb1='" + bb1 + '\'' +
                   ", bb2='" + bb2 + '\'' +
                   '}';
       }
   }
}


